package com.ruoyi.zhgd.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.annotation.DataColumn;
import com.ruoyi.common.annotation.DataPermission;
import com.ruoyi.zhgd.domain.NAsphaltData;
import com.ruoyi.zhgd.domain.bo.NAsphaltDataBo;
import com.ruoyi.zhgd.domain.vo.NAsphaltDataCheckVo;
import com.ruoyi.zhgd.domain.vo.NAsphaltDataVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.zhgd.domain.vo.NAsphaltDataWeightVo;
import com.ruoyi.zhgd.domain.vo.NAsphaltProduceDataVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 沥青拌合站数据Mapper接口
 *
 * @author zyb
 * @date 2023-09-06
 */
public interface NAsphaltDataMapper extends BaseMapperPlus<NAsphaltDataMapper, NAsphaltData, NAsphaltDataVo> {

    NAsphaltDataVo getById(@Param("id") String id);

    NAsphaltData getLatestData(@Param("params") NAsphaltDataBo bo);

    @DataPermission(
        @DataColumn(key = "deptName", value = "p.dept_id")
    )
    Page<NAsphaltProduceDataVo> produceAsphaltAggregate(@Param("params") NAsphaltDataBo bo, Page<Object> build);

    /**
     * 根据ids获取沥青拌合站生产数据
     * @param ids
     * @return
     */
    List<NAsphaltDataCheckVo> getByIds(@Param("ids") List<String> ids);

    NAsphaltDataWeightVo getDataWeightById(@Param("id") String id);
}
